find all element in list python

38

indices = [i for i, x in enumerate(my_list) if x == "whatever"]

Comments

Submit
0 Comments